package com.xsy.android.compose.wandroid.ui.main.compose

import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

/**
 *@author: xiaosy
 *时间: 2024/7/8
 *@Description: java类作用描述
 *@Version: 1.0
 **/
@Composable
fun BottomNavigationItem(
    modifier: Modifier = Modifier,
    @DrawableRes iconId: Int,
    title: String,
) {
    Column(
        horizontalAlignment = Alignment.CenterHorizontally,
        modifier = modifier.padding(0.dp, 8.dp, 0.dp, 8.dp)
    ) {
        Image(
            painter = painterResource(id = iconId),
            contentDescription = title,
            modifier = Modifier.size(24.dp)
        )
        Text(text = title, fontSize = 12.sp)
    }
}